package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "anomaly",    catalog = "")
public class Anomaly implements Serializable {
    private Long id;
    private String setCard;
    private Long anoTime;
    private String warCause;
    private String userName;
    private String userPhone;
    private String address;
    private String solve;
    private Long solveTime;
    private String orders;
    private String ordPeople;
    private String getPeople;
    private String getUuid;
    private String anoId;
    private Long sendTime;
    private String ordUuid;
    private String state;
    private String longitude;
    private String latitude;
    private String setAlias;

    @Basic
    @Column(name = "setalias")
    public String getSetAlias() {
        return setAlias;
    }

    public void setSetAlias(String setAlias) {
        this.setAlias = setAlias;
    }

    @Basic
    @Column(name = "longitude")
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }


    @Basic
    @Column(name = "latitude")
    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "set_card")
    public String getSetCard() {
        return setCard;
    }

    public void setSetCard(String setCard) {
        this.setCard = setCard;
    }

    @Basic
    @Column(name = "ano_time")
    public Long getAnoTime() {
        return anoTime;
    }

    public void setAnoTime(Long anoTime) {
        this.anoTime = anoTime;
    }

    @Basic
    @Column(name = "war_cause")
    public String getWarCause() {
        return warCause;
    }

    public void setWarCause(String warCause) {
        this.warCause = warCause;
    }

    @Basic
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "user_phone")
    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "solve")
    public String getSolve() {
        return solve;
    }

    public void setSolve(String solve) {
        this.solve = solve;
    }

    @Basic
    @Column(name = "solve_time")
    public Long getSolveTime() {
        return solveTime;
    }

    public void setSolveTime(Long solveTime) {
        this.solveTime = solveTime;
    }

    @Basic
    @Column(name = "orders")
    public String getOrders() {
        return orders;
    }

    public void setOrders(String orders) {
        this.orders = orders;
    }

    @Basic
    @Column(name = "ord_people")
    public String getOrdPeople() {
        return ordPeople;
    }

    public void setOrdPeople(String ordPeople) {
        this.ordPeople = ordPeople;
    }

    @Basic
    @Column(name = "get_people")
    public String getGetPeople() {
        return getPeople;
    }

    public void setGetPeople(String getPeople) {
        this.getPeople = getPeople;
    }

    @Basic
    @Column(name = "get_uuid")
    public String getGetUuid() {
        return getUuid;
    }

    public void setGetUuid(String getUuid) {
        this.getUuid = getUuid;
    }

    @Basic
    @Column(name = "ano_id")
    public String getAnoId() {
        return anoId;
    }

    public void setAnoId(String anoId) {
        this.anoId = anoId;
    }

    @Basic
    @Column(name = "send_time")
    public Long getSendTime() {
        return sendTime;
    }

    public void setSendTime(Long sendTime) {
        this.sendTime = sendTime;
    }

    @Basic
    @Column(name = "ord_uuid")
    public String getOrdUuid() {
        return ordUuid;
    }

    public void setOrdUuid(String ordUuid) {
        this.ordUuid = ordUuid;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Anomaly anomaly = (Anomaly) o;
        return Objects.equals(id, anomaly.id) &&
                Objects.equals(setCard, anomaly.setCard) &&
                Objects.equals(anoTime, anomaly.anoTime) &&
                Objects.equals(warCause, anomaly.warCause) &&
                Objects.equals(userName, anomaly.userName) &&
                Objects.equals(userPhone, anomaly.userPhone) &&
                Objects.equals(address, anomaly.address) &&
                Objects.equals(solve, anomaly.solve) &&
                Objects.equals(solveTime, anomaly.solveTime) &&
                Objects.equals(orders, anomaly.orders) &&
                Objects.equals(ordPeople, anomaly.ordPeople) &&
                Objects.equals(getPeople, anomaly.getPeople) &&
                Objects.equals(getUuid, anomaly.getUuid) &&
                Objects.equals(anoId, anomaly.anoId) &&
                Objects.equals(sendTime, anomaly.sendTime) &&
                Objects.equals(ordUuid, anomaly.ordUuid) &&
                Objects.equals(state, anomaly.state);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, setCard, anoTime, warCause, userName, userPhone, address, solve, solveTime, orders, ordPeople, getPeople, getUuid, anoId, sendTime, ordUuid, state);
    }
}
